using System;

namespace Qplus.protocol
{

    /**
     * 
     * 发送语音数据请求
     *
     */
    public class C2U_REQ_ROOM_SENDVOICE : OutPacket
    {

        /**
         * 发送语音数据包
         * @param roomID
         * @param dlen
         * @param data
         * @return
         */
        public C2U_REQ_ROOM_SENDVOICE sendVoiceData(long roomID, int dlen, byte[] data, int frames)
        {
            init();
            int len = 0;
            len += put4(roomID);
            len += put1((byte)frames);
            len += put1((byte)dlen);
            len += putN(data, 0, dlen);

            postLen(len);
            return this;
        }
    }
}
